package com.zego.wawaji.base.status;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;

import com.zego.wawaji.base.invoker.Invoker;
import com.noble.library.basic.log.PLogger;

/**
 * 屏幕状态
 * Created by Su on 2018/2/12.
 */
public class ScreenReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, final Intent intent) {
        if (TextUtils.equals(intent.getAction(), Intent.ACTION_SCREEN_ON)) {
            Invoker.getInstance().doInJS(Invoker.JSCMD_refresh_web, null);
        }
        if (TextUtils.equals(intent.getAction(), Intent.ACTION_SCREEN_OFF)) {
            PLogger.d("kjdkjkjk------熄屏");
        }
    }
}
